import axios from 'axios'

const swiper= {
    // 获取轮播图数据
    getAllSwiper: function () {
        return axios({
            url: '/admin/getAllSwiper',
            method: 'GET',
         
        })
    },
    //获取一张轮播图
    findByIdSwiper: function (params) {
        return axios({
            url: '/admin/findByIdSwiper?_id=613ad3528d446f4358b31156',
            method: 'GET',
            params
        })
    },
    // //新增轮播图数据
    addSwiper: function (data) {
        return axios({
            url: '/admin/addSwiper',
            method: 'POST',
            data
        })
    },
    // //删除轮播图
    deleteSwiper: function (params) {
        return axios({
            url: '/admin/deleteSwiper',
            params
        })
    },
    //修改轮播图
    updateSwiper: function (data) {
        return axios({
            url: '/admin/updateSwiper',
            method: 'POST',
            data
        })
    },
    //上传轮播图
    fileUpload: function (data) {
        return axios({
            url: '/admin/fileUpload',
            method: 'POST',
            data
        })
    },
    //轮播图上下架
    updateSwiperShow: function (data) {
        return axios({
            url: '/admin/updateSwiperShow',
            method: 'POST',
            data
        })
    },
    //删除轮播图片
    deleteFiles: function (data) {
        return axios({
            url: '/admin/deleteFiles',
            method: 'POST',
            data
        })
    },

}
export default swiper;